package com.core.base.searchForm;

import java.util.HashMap;
import java.util.Map;

import com.core.util.CollectionUtils;

/**
 * 对外提供的基层searchform,针对不使用HQL的情况
 * 添加注解
 * @author Administrator
 *
 */
public abstract class BaseSearchForm extends AbstractBaseSearchForm {

	/**排序信息*/
	private Map<String, SearchOrder> orderBys;
	
	public void setOrderBys(Map<String, SearchOrder> orderBys) {
		this.orderBys = orderBys;
	}
	
	@Override
	public void setCurrentPage(int currentPage) {
		// TODO Auto-generated method stub
		super.setCurrentPage(currentPage);
	}



	@Override
	public void addOrder(String fieldName, SearchOrder searchOrder) {
		if(CollectionUtils.empty(orderBys)){
			orderBys = new HashMap<>();
		}
		orderBys.put(fieldName, searchOrder);
	}
	
	@Override
	public Map<String, SearchOrder> getOrderBys(){
		return orderBys;
	}

}
